import { drapDice } from './utils';

function testDice() {
  const counters = [0, 0, 0, 0, 0, 0];
  var testNember = 10 ** 7;
  for (let i = 1; i <= testNember; i++) {
    if (drapDice() === 1) {
      counters[0] = counters[0] + 1;
    }
    if (drapDice() === 2) {
      counters[1] = counters[1] + 1;
    }
    if (drapDice() === 3) {
      counters[2] = counters[2] + 1;
    }
    if (drapDice() === 4) {
      counters[3] = counters[3] + 1;
    }
    if (drapDice() === 5) {
      counters[4] = counters[4] + 1;
    }
    if (drapDice() === 6) {
      counters[5] = counters[5] + 1;
    }
  }
  return [
    counters[0] / testNember,
    counters[1] / testNember,
    counters[2] / testNember,
    counters[3] / testNember,
    counters[4] / testNember,
    counters[5] / testNember,
  ];
}
